CREATE TABLE [dbo].[TDCOMP_COBR]
(
[CO_EMPR] [dbo].[TD_VC_002] NOT NULL,
[TI_COMP_COBR] [dbo].[TD_VC_003] NOT NULL,
[NU_COMP_COBR] [dbo].[TD_VC_008] NOT NULL,
[NU_CUOT_DETA] [dbo].[TD_IN_001] NOT NULL CONSTRAINT [DF__TDCOMP_CO__NU_CU__02284B6B] DEFAULT ((0)),
[FE_VENC_CUOT] [dbo].[TD_DT_001] NOT NULL,
[IM_CUOT] [dbo].[TD_NU_016_004] NOT NULL CONSTRAINT [DF__TDCOMP_CO__IM_CU__031C6FA4] DEFAULT ((0)),
[IM_COBR] [dbo].[TD_NU_016_004] NOT NULL CONSTRAINT [DF__TDCOMP_CO__IM_CO__041093DD] DEFAULT ((0)),
[IM_APLI] [dbo].[TD_NU_016_004] NOT NULL CONSTRAINT [DF__TDCOMP_CO__IM_AP__0504B816] DEFAULT ((0)),
[ST_CONT] [dbo].[TD_VC_001_INTE] NOT NULL CONSTRAINT [DF__TDCOMP_CO__ST_CO__05F8DC4F] DEFAULT ('N'),
[NU_PROC] [dbo].[TD_IN_001] NULL CONSTRAINT [DF__TDCOMP_CO__NU_PR__07E124C1] DEFAULT ((0)),
[CO_USUA_CREA] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TDCOMP_CO__CO_US__08D548FA] DEFAULT (suser_sname()),
[FE_USUA_CREA] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TDCOMP_CO__FE_US__09C96D33] DEFAULT (getdate()),
[CO_USUA_MODI] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TDCOMP_CO__CO_US__0ABD916C] DEFAULT (suser_sname()),
[FE_USUA_MODI] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TDCOMP_CO__FE_US__0BB1B5A5] DEFAULT (getdate())
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TDCOMP_COBR] WITH NOCHECK ADD CONSTRAINT [CK__TDCOMP_CO__ST_CO__06ED0088] CHECK NOT FOR REPLICATION (([ST_CONT]='P' OR [ST_CONT]='N'))
GO
ALTER TABLE [dbo].[TDCOMP_COBR] ADD CONSTRAINT [PK__TDCOMP_C__9B2AD6E31B73E779] PRIMARY KEY CLUSTERED  ([CO_EMPR], [TI_COMP_COBR], [NU_COMP_COBR], [NU_CUOT_DETA]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TDCOMP_COBR] ADD CONSTRAINT [FK__TDCOMP_CO__CO_EM__37FB178E] FOREIGN KEY ([CO_EMPR]) REFERENCES [dbo].[TMPARA_TESO] ([CO_EMPR])
GO
ALTER TABLE [dbo].[TDCOMP_COBR] ADD CONSTRAINT [FK__TDCOMP_COBR__3706F355] FOREIGN KEY ([CO_EMPR], [TI_COMP_COBR], [NU_COMP_COBR]) REFERENCES [dbo].[TCCOMP_COBR] ([CO_EMPR], [TI_COMP_COBR], [NU_COMP_COBR])
GO
